#include <iostream>
using namespace std;
void main()
{ 
cout<<"pn\tvt\tsr\tch\tpt\tsb\tvs\t\n";
cout<<"\t\t\t\t\t";

	for(int den=1,nedelya=1;den<=31;den++)
	{
		cout<<den<<"\t";
		if(den==2)
		{
		nedelya++;
		}
		if(den%7==2)
		{
			cout<<"\n";
			nedelya++;
		}
	
	}
cout<<"\n";
}